<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Heartbeat consumer</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__HBconsumer.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Heartbeat consumer<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__HBconsumer_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__HBconsumer_8h.html">CO_HBconsumer.h</a></td></tr>
<tr class="memdesc:CO__HBconsumer_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Heartbeat consumer protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__HBconsNode__t.html">CO_HBconsNode_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">One monitored node inside <a class="el" href="structCO__HBconsumer__t.html" title="Heartbeat consumer object.">CO_HBconsumer_t</a>.  <a href="structCO__HBconsNode__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Heartbeat consumer object.  <a href="structCO__HBconsumer__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga7658e41b7c045b7b612e4ef8a2b663f3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3">CO_HBconsumer_state_t</a> { <a class="el" href="group__CO__HBconsumer.html#gga7658e41b7c045b7b612e4ef8a2b663f3a4c481c1ba58fb71b9870e8b355351211">CO_HBconsumer_UNCONFIGURED</a> = 0x00U, 
<a class="el" href="group__CO__HBconsumer.html#gga7658e41b7c045b7b612e4ef8a2b663f3af36bc5f46fd11044dc2d1d995ad8f28b">CO_HBconsumer_UNKNOWN</a> = 0x01U, 
<a class="el" href="group__CO__HBconsumer.html#gga7658e41b7c045b7b612e4ef8a2b663f3ad80c78b38e6d28927bf3d1b1464b36e9">CO_HBconsumer_ACTIVE</a> = 0x02U, 
<a class="el" href="group__CO__HBconsumer.html#gga7658e41b7c045b7b612e4ef8a2b663f3a8a7ac49e5c809994ee65f365a7a75f22">CO_HBconsumer_TIMEOUT</a> = 0x03U
 }</td></tr>
<tr class="memdesc:ga7658e41b7c045b7b612e4ef8a2b663f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Heartbeat state of a node.  <a href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3">More...</a><br /></td></tr>
<tr class="separator:ga7658e41b7c045b7b612e4ef8a2b663f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacc31c4848a14c9c367505b20e4a6a496"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#gacc31c4848a14c9c367505b20e4a6a496">CO_HBconsumer_init</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, CO_SDO_t *SDO, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> HBconsTime[], <a class="el" href="structCO__HBconsNode__t.html">CO_HBconsNode_t</a> monitoredNodes[], <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> numberOfMonitoredNodes, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdxStart)</td></tr>
<tr class="memdesc:gacc31c4848a14c9c367505b20e4a6a496"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer object.  <a href="group__CO__HBconsumer.html#gacc31c4848a14c9c367505b20e4a6a496">More...</a><br /></td></tr>
<tr class="separator:gacc31c4848a14c9c367505b20e4a6a496"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4bfa2bbd2b7d70f25b6bf173932170a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#gaf4bfa2bbd2b7d70f25b6bf173932170a">CO_HBconsumer_initEntry</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> consumerTime_ms)</td></tr>
<tr class="memdesc:gaf4bfa2bbd2b7d70f25b6bf173932170a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize one Heartbeat consumer entry.  <a href="group__CO__HBconsumer.html#gaf4bfa2bbd2b7d70f25b6bf173932170a">More...</a><br /></td></tr>
<tr class="separator:gaf4bfa2bbd2b7d70f25b6bf173932170a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2faa596dcebbec8f486788a791d638be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga2faa596dcebbec8f486788a791d638be">CO_HBconsumer_initCallbackPre</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, void *object, void(*pFunctSignal)(void *object))</td></tr>
<tr class="memdesc:ga2faa596dcebbec8f486788a791d638be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer callback function.  <a href="group__CO__HBconsumer.html#ga2faa596dcebbec8f486788a791d638be">More...</a><br /></td></tr>
<tr class="separator:ga2faa596dcebbec8f486788a791d638be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabab4b2dd74f6e341fe8b683f7a6d56f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#gabab4b2dd74f6e341fe8b683f7a6d56f3">CO_HBconsumer_initCallbackNmtChanged</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object, void(*pFunctSignal)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> state, void *object))</td></tr>
<tr class="memdesc:gabab4b2dd74f6e341fe8b683f7a6d56f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer NMT changed callback function.  <a href="group__CO__HBconsumer.html#gabab4b2dd74f6e341fe8b683f7a6d56f3">More...</a><br /></td></tr>
<tr class="separator:gabab4b2dd74f6e341fe8b683f7a6d56f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6c9bd0df815428719b9f9429ed4476a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga6c9bd0df815428719b9f9429ed4476a9">CO_HBconsumer_initCallbackHeartbeatStarted</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object, void(*pFunctSignal)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object))</td></tr>
<tr class="memdesc:ga6c9bd0df815428719b9f9429ed4476a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer started callback function.  <a href="group__CO__HBconsumer.html#ga6c9bd0df815428719b9f9429ed4476a9">More...</a><br /></td></tr>
<tr class="separator:ga6c9bd0df815428719b9f9429ed4476a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef359610a0cdd1331da266be9c55c2d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#gaef359610a0cdd1331da266be9c55c2d2">CO_HBconsumer_initCallbackTimeout</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object, void(*pFunctSignal)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object))</td></tr>
<tr class="memdesc:gaef359610a0cdd1331da266be9c55c2d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer timeout callback function.  <a href="group__CO__HBconsumer.html#gaef359610a0cdd1331da266be9c55c2d2">More...</a><br /></td></tr>
<tr class="separator:gaef359610a0cdd1331da266be9c55c2d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8758a7bd92aa458b90d5da9221cc694f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga8758a7bd92aa458b90d5da9221cc694f">CO_HBconsumer_initCallbackRemoteReset</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object, void(*pFunctSignal)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object))</td></tr>
<tr class="memdesc:ga8758a7bd92aa458b90d5da9221cc694f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Heartbeat consumer remote reset detected callback function.  <a href="group__CO__HBconsumer.html#ga8758a7bd92aa458b90d5da9221cc694f">More...</a><br /></td></tr>
<tr class="separator:ga8758a7bd92aa458b90d5da9221cc694f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29e01b5fe6392ce688e8ac57d966258f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga29e01b5fe6392ce688e8ac57d966258f">CO_HBconsumer_process</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> NMTisPreOrOperational, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga29e01b5fe6392ce688e8ac57d966258f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process Heartbeat consumer object.  <a href="group__CO__HBconsumer.html#ga29e01b5fe6392ce688e8ac57d966258f">More...</a><br /></td></tr>
<tr class="separator:ga29e01b5fe6392ce688e8ac57d966258f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga041b92d6feb1774cb7eb87fba842fdf2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#gaef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga041b92d6feb1774cb7eb87fba842fdf2">CO_HBconsumer_getIdxByNodeId</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId)</td></tr>
<tr class="memdesc:ga041b92d6feb1774cb7eb87fba842fdf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the heartbeat producer object index by node ID.  <a href="group__CO__HBconsumer.html#ga041b92d6feb1774cb7eb87fba842fdf2">More...</a><br /></td></tr>
<tr class="separator:ga041b92d6feb1774cb7eb87fba842fdf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c5d4eccbcb0f1f8965a336fde04e765"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3">CO_HBconsumer_state_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga7c5d4eccbcb0f1f8965a336fde04e765">CO_HBconsumer_getState</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx)</td></tr>
<tr class="memdesc:ga7c5d4eccbcb0f1f8965a336fde04e765"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current state of a heartbeat producer by the index in OD 0x1016.  <a href="group__CO__HBconsumer.html#ga7c5d4eccbcb0f1f8965a336fde04e765">More...</a><br /></td></tr>
<tr class="separator:ga7c5d4eccbcb0f1f8965a336fde04e765"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1731e3860fce5ca5d341d9b7fc32d8d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#gaef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__HBconsumer.html#ga1731e3860fce5ca5d341d9b7fc32d8d6">CO_HBconsumer_getNmtState</a> (<a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *HBcons, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *nmtState)</td></tr>
<tr class="memdesc:ga1731e3860fce5ca5d341d9b7fc32d8d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current NMT state of a heartbeat producer by the index in OD 0x1016.  <a href="group__CO__HBconsumer.html#ga1731e3860fce5ca5d341d9b7fc32d8d6">More...</a><br /></td></tr>
<tr class="separator:ga1731e3860fce5ca5d341d9b7fc32d8d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Heartbeat consumer protocol.</p>
<p>Heartbeat consumer monitors Heartbeat messages from remote nodes. If any monitored node don't send his Heartbeat in specified time, Heartbeat consumer sends emergency message. If all monitored nodes are operational, then variable <em>allMonitoredOperational</em> inside <a class="el" href="structCO__HBconsumer__t.html" title="Heartbeat consumer object.">CO_HBconsumer_t</a> is set to true. Monitoring starts after the reception of the first HeartBeat (not bootup).</p>
<p>Heartbeat set up is done by writing to the OD registers 0x1016 or by using the function <em><a class="el" href="group__CO__HBconsumer.html#gaf4bfa2bbd2b7d70f25b6bf173932170a" title="Initialize one Heartbeat consumer entry.">CO_HBconsumer_initEntry()</a></em></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__CO__NMT__Heartbeat.html">NMT and Heartbeat</a> </dd></dl>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga7658e41b7c045b7b612e4ef8a2b663f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7658e41b7c045b7b612e4ef8a2b663f3">&#9670;&nbsp;</a></span>CO_HBconsumer_state_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3">CO_HBconsumer_state_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Heartbeat state of a node. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7658e41b7c045b7b612e4ef8a2b663f3a4c481c1ba58fb71b9870e8b355351211"></a>CO_HBconsumer_UNCONFIGURED&#160;</td><td class="fielddoc"><p>Consumer entry inactive. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7658e41b7c045b7b612e4ef8a2b663f3af36bc5f46fd11044dc2d1d995ad8f28b"></a>CO_HBconsumer_UNKNOWN&#160;</td><td class="fielddoc"><p>Consumer enabled, but no heartbeat received yet. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7658e41b7c045b7b612e4ef8a2b663f3ad80c78b38e6d28927bf3d1b1464b36e9"></a>CO_HBconsumer_ACTIVE&#160;</td><td class="fielddoc"><p>Heartbeat received within set time. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7658e41b7c045b7b612e4ef8a2b663f3a8a7ac49e5c809994ee65f365a7a75f22"></a>CO_HBconsumer_TIMEOUT&#160;</td><td class="fielddoc"><p>No heatbeat received for set time. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gacc31c4848a14c9c367505b20e4a6a496"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc31c4848a14c9c367505b20e4a6a496">&#9670;&nbsp;</a></span>CO_HBconsumer_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_HBconsumer_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CO_SDO_t *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>HBconsTime</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__HBconsNode__t.html">CO_HBconsNode_t</a>&#160;</td>
          <td class="paramname"><em>monitoredNodes</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>numberOfMonitoredNodes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdxStart</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO server object. </td></tr>
    <tr><td class="paramname">HBconsTime</td><td>Pointer to <em>Consumer Heartbeat Time</em> array from Object Dictionary (index 0x1016). Size of array is equal to numberOfMonitoredNodes. </td></tr>
    <tr><td class="paramname">monitoredNodes</td><td>Pointer to the externaly defined array of the same size as numberOfMonitoredNodes. </td></tr>
    <tr><td class="paramname">numberOfMonitoredNodes</td><td>Total size of the above arrays. </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device for Heartbeat reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdxStart</td><td>Starting index of receive buffer in the above CAN device. Number of used indexes is equal to numberOfMonitoredNodes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a> CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="gaf4bfa2bbd2b7d70f25b6bf173932170a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf4bfa2bbd2b7d70f25b6bf173932170a">&#9670;&nbsp;</a></span>CO_HBconsumer_initEntry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_HBconsumer_initEntry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>consumerTime_ms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize one Heartbeat consumer entry. </p>
<p>Calling this function has the same affect as writing to the corresponding entries in the Object Dictionary (index 0x1016) </p><dl class="section remark"><dt>Remarks</dt><dd>The values in the Object Dictionary must be set manually by the calling function so that heartbeat consumer behaviour matches the OD value.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>index of the node in HBcons object </td></tr>
    <tr><td class="paramname">nodeId</td><td>see OD 0x1016 description </td></tr>
    <tr><td class="paramname">consumerTime_ms</td><td>in milliseconds. see OD 0x1016 description </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="ga2faa596dcebbec8f486788a791d638be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2faa596dcebbec8f486788a791d638be">&#9670;&nbsp;</a></span>CO_HBconsumer_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__HBconsumer.html#ga29e01b5fe6392ce688e8ac57d966258f" title="Process Heartbeat consumer object.">CO_HBconsumer_process()</a> function. Callback is called after HBconsumer message is received from the CAN bus.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabab4b2dd74f6e341fe8b683f7a6d56f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabab4b2dd74f6e341fe8b683f7a6d56f3">&#9670;&nbsp;</a></span>CO_HBconsumer_initCallbackNmtChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_initCallbackNmtChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> state, void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer NMT changed callback function. </p>
<p>Function initializes optional callback function, which is called when NMT state from the remote node changes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>index of the node in HBcons object (only when CO_CONFIG_HB_CONS_CALLBACK_MULTI is enabled) </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL. </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6c9bd0df815428719b9f9429ed4476a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6c9bd0df815428719b9f9429ed4476a9">&#9670;&nbsp;</a></span>CO_HBconsumer_initCallbackHeartbeatStarted()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_initCallbackHeartbeatStarted </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer started callback function. </p>
<p>Function initializes optional callback function, which is called for the first received heartbeat after activating hb consumer or timeout. Function may wake up external task, which handles this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>index of the node in HBcons object </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaef359610a0cdd1331da266be9c55c2d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef359610a0cdd1331da266be9c55c2d2">&#9670;&nbsp;</a></span>CO_HBconsumer_initCallbackTimeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_initCallbackTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer timeout callback function. </p>
<p>Function initializes optional callback function, which is called when the node state changes from active to timeout. Function may wake up external task, which handles this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>index of the node in HBcons object </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8758a7bd92aa458b90d5da9221cc694f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8758a7bd92aa458b90d5da9221cc694f">&#9670;&nbsp;</a></span>CO_HBconsumer_initCallbackRemoteReset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_initCallbackRemoteReset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> idx, void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Heartbeat consumer remote reset detected callback function. </p>
<p>Function initializes optional callback function, which is called when a bootup message is received from the remote node. Function may wake up external task, which handles this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>index of the node in HBcons object </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga29e01b5fe6392ce688e8ac57d966258f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29e01b5fe6392ce688e8ac57d966258f">&#9670;&nbsp;</a></span>CO_HBconsumer_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_HBconsumer_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>NMTisPreOrOperational</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process Heartbeat consumer object. </p>
<p>Function must be called cyclically.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">NMTisPreOrOperational</td><td>True if this node is NMT_PRE_OPERATIONAL or NMT_OPERATIONAL. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga895d7fad40b60aacdac3cb0615729b5e" title="Process CANopen objects.">CO_process()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga041b92d6feb1774cb7eb87fba842fdf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga041b92d6feb1774cb7eb87fba842fdf2">&#9670;&nbsp;</a></span>CO_HBconsumer_getIdxByNodeId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#gaef44329758059c91c76d334e8fc09700">int8_t</a> CO_HBconsumer_getIdxByNodeId </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the heartbeat producer object index by node ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">nodeId</td><td>producer node ID </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>index. -1 if not found </dd></dl>

</div>
</div>
<a id="ga7c5d4eccbcb0f1f8965a336fde04e765"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7c5d4eccbcb0f1f8965a336fde04e765">&#9670;&nbsp;</a></span>CO_HBconsumer_getState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3">CO_HBconsumer_state_t</a> CO_HBconsumer_getState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current state of a heartbeat producer by the index in OD 0x1016. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramname">idx</td><td>object sub index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__HBconsumer.html#ga7658e41b7c045b7b612e4ef8a2b663f3" title="Heartbeat state of a node.">CO_HBconsumer_state_t</a> </dd></dl>

</div>
</div>
<a id="ga1731e3860fce5ca5d341d9b7fc32d8d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1731e3860fce5ca5d341d9b7fc32d8d6">&#9670;&nbsp;</a></span>CO_HBconsumer_getNmtState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#gaef44329758059c91c76d334e8fc09700">int8_t</a> CO_HBconsumer_getNmtState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__HBconsumer__t.html">CO_HBconsumer_t</a> *&#160;</td>
          <td class="paramname"><em>HBcons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *&#160;</td>
          <td class="paramname"><em>nmtState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current NMT state of a heartbeat producer by the index in OD 0x1016. </p>
<p>NMT state is only available when heartbeat is enabled for this index!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">HBcons</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">idx</td><td>object sub index </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nmtState</td><td>of this index </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>NMT state has been received and is valid </td></tr>
    <tr><td class="paramname">-1</td><td>not valid </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
